home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 11 / Mac Magazin and MacEasy Magazine CD - Issue 11.iso / Sharewarebibliothek / Entwickler / CDEF-DeBugger 2.0 ƒ / splash.c < prev    next >
Text File  |  1995-05-31  |  994b  |  41 lines

  1. #define    SPLASH_WINDOW    128
  2.  
  3. // prototypes
  4. void    CreateMySplashWindow( void );
  5.  
  6. /****************************************************************************
  7.  
  8.     This is a simple little procedure for displaying my stupid looking
  9.     splash screen. It's used when a user selects "about" in the apple
  10.     menu.
  11.  
  12. *****************************************************************************/
  13. void    CreateMySplashWindow( void )
  14. {
  15.     DialogPtr    splash_dialog;
  16.     GrafPtr        oldPort;
  17.     short        itemHit, iType;
  18.     Handle        iHandle;
  19.     Rect        iRect;
  20.     
  21.     splash_dialog = GetNewDialog( SPLASH_WINDOW, 0, (WindowPtr)-1 );
  22.     GetPort( &oldPort );
  23.     SetPort( splash_dialog );
  24.     
  25.     // simple procedure to frame the 'ok' button
  26.     GetDItem( splash_dialog, 1, &iType, &iHandle, &iRect );
  27.     PenSize( 3, 3 );
  28.     InsetRect( &iRect, -4, -4 );
  29.     FrameRoundRect( &iRect, 16, 16 );
  30.     
  31.     do { 
  32.         ModalDialog( 0, &itemHit );
  33.         switch( itemHit ) {
  34.                 case ok:
  35.                     break;
  36.             }
  37.     } while( itemHit != 1 );
  38.     
  39.     DisposeDialog( splash_dialog );
  40.     SetPort( oldPort );
  41. }